<template>
  <scroll class="content" ref="scroll">
      <cart-list-item v-for="(item,index) in cartList" :key="item.id" :item-info="item"></cart-list-item>

  </scroll>
</template>

<script>
  import Scroll from "components/common/scroll/Scroll";
  import CartListItem from './CartListItem'

  import {mapGetters} from 'vuex'

	export default {
		name: "CartList",
    components: {
		  Scroll, CartListItem
    },
    computed: {
		  ...mapGetters(['cartList'])
    },
    // 在活跃时刷新高度，防止出现无法滚动的现象
    activated() {
		  this.$refs.scroll.refresh()
    }
  }
</script>

<style scoped>

</style>
